package view;

import Util.ActionContext;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
public class OtherView implements ViewResult {
    private Object data;
    public OtherView(Object data){
        this.data=data;
    }
    @Override
    public void execute() {
        try {
            HttpServletResponse response = ActionContext.getContext().getResponse();
            response.setContentType("text/html;charset=utf-8");
            response.getWriter().print(data);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
